package com.ruoyi.business.service;

import com.ruoyi.activiti.domain.IProcessInstance;
import com.ruoyi.business.domain.LeaveRequestForm;
import com.ruoyi.common.core.domain.AjaxResult;
import org.activiti.engine.repository.ProcessDefinition;

import java.util.List;
import java.util.Map;

/**
 * @author danghf
 * @date 2024/04/27 18:25:44
 */
public interface LeaveRequestFormService {
    /**
     * 发起流程
     * @param form 请假表单
     * @param map 流程参数
     * @param processDefinition 流程定义
     * @return ajaxResult
     */
    AjaxResult start(LeaveRequestForm form, Map<String,Object> map, ProcessDefinition processDefinition);

    /**
     * 新增请假申请表单
     * @param leaveRequestForm 请假申请表单
     * @return int
     */
    int insertOne(LeaveRequestForm leaveRequestForm);


    /**
     * 查询请假申请表单
     * @param id 请假申请表单ID
     * @return 请假申请表单
     */
    LeaveRequestForm selectLeaveRequestFormById(Long id);
}
